public class demo2 {
    class Solution {
        public void reverseString(char[] s) {
            int n=s.length;
            int start=0,end=n-1;
            while(start<end){
                temp(s,start,end);
                start++;
                end--;
            }
        }
        public void temp(char[] s,int start,int end){
            char temp=s[end];
            s[end]=s[start];
            s[start]=temp;
        }
    }
}
